import Vue from 'vue'
import App from './App.vue'
import App2 from './App2.vue'
import VueResource from 'vue-resource'
import VueRouter from 'vue-router'
import Home from './home.vue'
import Explorer from './Explorer.vue'
import Cart from './Cart.vue'
import Me from './Me.vue'

Vue.use(VueRouter);
Vue.use(VueResource);
const router = new VueRouter({
    mode: 'history',
    base: __dirname,
    linkActiveClass: "active",
    routes: [
        {name:'App',path: '/', component: App},
        {name:'Explorer',path: '/Explorer', component: Explorer},
        {name:'Cart',path: '/cart', component: Cart},
        {name:'Me',path: '/me', component: Me}
    ]
})

new Vue({
    http: {root: "/", headers: {}},
    el: '#app',
    router,//将路由实例添加到Vue实例中
    render: h => h(App2)
})

